<template>
 <div>
     <table border="1" style="border-collapse:collapse;" width="400" height="300">
         <tr>
             <th>id</th>
             <th>姓名</th>
             <th>年龄</th>
             <th>操作</th>
         </tr>
         <tr v-for="item in arr" :key="item.id">
             <td>{{item.id}}</td>
             <td>{{item.name}}</td>
             <td>{{item.age}}</td>
             <td>
                 <!-- 匿名 -->
                 <!-- <slot :row="item" str="hello world"></slot> -->
                 <!-- 具名 -->
                 <slot name="soltA" :row="item" str="hello world"></slot>
             </td>
         </tr>
     </table>
 </div>
</template>

<script>
export default {
    data(){
         return{
             arr:[
                 {
                     id:1,
                     name:'张三',
                     age:20
                 },
                 {
                     id:2,
                     name:'李四',
                     age:20
                 },
                 {
                     id:3,
                     name:'王五',
                     age:20
                 },
             ]
         }
    },
    created(){},
    methods:{},
    components:{}
}

</script>
<style scoped>
</style>